package NiuKe;

import java.util.Scanner;

/**
 * 1.小球自由落体
 * 一球从100米高度自由落下，每次落地后反跳回原高度的一半；
 * 再落下，求它在第n次落地时，共经过多少米？第n次反弹多高？
 * 数据范围：1≤n≤100
 *
 * 1 100 = 100 50
 * 2 100 + 50 + 50 = 200 25
 * 3 100 + 50 + 50 + 25 + 25 = 250 12.5
 * 4 100 + 50 + 50 + 25 + 25 + 12.5 + 12.5 = 275
 *
 */
public class XiaoQiuXiaLuo {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int inputVal = in.nextInt();
        double[] solution = Solution(inputVal);
        System.out.printf("%.6f %.6f", solution[0], solution[1]);
    }
    public static double[] Solution(int n){
        if(n == 1){
            return new double[]{100, 50};
        }
        double pre = 100;
        double fanTan = 50;
        while (n - 1 > 0){
            pre = pre + fanTan * 2;
            fanTan = fanTan / 2;
            n--;
        }
        return new double[]{pre, fanTan};
    }
}
